{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c1ede8c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import h5py\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.image as mpimg\n",
    "import os\n",
    "import os.path as osp\n",
    "import imageio.v2 as imageio\n",
    "\n",
    "from scipy.stats import describe"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f638ac51",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "s = 0\n",
    "# List of file paths\n",
    "root = \"/lc/data/3D/DL3DV/1K/7cead952c513731372f60c056aadfebb56e5572dba460fad3ea56dea6a0a8252/images_8\"\n",
    "file_paths = sorted([f for f in os.listdir(root) if f.endswith(\".png\")])\n",
    "\n",
    "cols = 2\n",
    "rows = 5\n",
    "interval = 1\n",
    "# Create a figure with 2 columns and 10 rows,dpi=100\n",
    "fig, axs = plt.subplots(rows, cols, figsize=(12, rows*3))\n",
    "\n",
    "# Iterate over the file paths and display the images\n",
    "for i, file_path in enumerate(file_paths[s:rows*cols*interval+s:interval]):\n",
    "    img = mpimg.imread(osp.join(root, file_path))\n",
    "    # depth = mpimg.imread(osp.join(root, file_path.replace(\"color.png\",\"depth.png\")))\n",
    "    # depth[depth == 1.0] = 0\n",
    "    axs[i // cols , i % cols ].imshow(img)\n",
    "    axs[i // cols , i % cols].axis(\"off\")  # Hide axis ticks\n",
    "    # fname = file_path.split('.')[0].split('-')[1]\n",
    "    # axs[i * 2 // cols , i * 2 % cols].set_title(f\"{fname}_{i}\")\n",
    "    # axs[i * 2 // cols , i * 2 % cols + 1].imshow(depth)\n",
    "    # axs[i * 2 // cols , i * 2 % cols + 1].axis(\"off\")  # Hide axis ticks\n",
    "    # axs[i * 2 // cols , i * 2 % cols + 1].set_title(f\"{fname}_depth\")\n",
    "\n",
    "plt.show()\n",
    "# continious pose with slow motion\n",
    "# low resolution, no depth"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9907b236",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(img.shape)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "vggt",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
